pass-through: drop lock before calling xfree() on error path
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 30 Jan 2009 11:13:55 +0000 (11:13 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 30 Jan 2009 11:13:55 +0000 (11:13 +0000)
Signed-off-by: Jan Beulich <jbeulich@novell.com>
xen/drivers/passthrough/io.c

index d240441c15a2d66a3836bf880ea503f92fa5b174..dce6814a259c1f23c3c0b5af2e24b4f5a91a8a65 100644 (file)
@@ -87,8 +87,8 @@ int pt_irq_create_bind_vtd(
 
         if ( domain_set_irq_dpci(d, hvm_irq_dpci) == 0 )
         {
-            xfree(hvm_irq_dpci);
             spin_unlock(&d->event_lock);
+            xfree(hvm_irq_dpci);
             return -EINVAL;
         }
     }